<SCRIPT LANGUAGE="JavaScript">  
    function validation()
    {
        var temp="";
        temp=document.getElementById('AdvSlip');
        if( temp.value=='' )
        {
            alert('Masukkan slip pembayaran');
            return false;             
        }     
    }
</SCRIPT>
<?php
echo "<div class='form'>";
echo "<h2> Payment Slip </h2>";
echo "<hr color='#2A7EF7'>";

    echo "<div style='margin:10px 10px 10px 120px;padding:5px;border-top:2px solid #eee;border-left:2px solid #eee;border-right:3px solid #ccc;border-bottom:3px solid #ccc; width:250px; height:100px '>";
    echo $html->link($html->image('../'.$this->data['Adv']['image'], array('class' => 'adv')), $this->data['Adv']['link'], array(), false, false);
    echo "</div>";
            
    echo "<div class='kotak2'>";
    echo $form->create('Adv',array('action'=>'payment','type'=>'file','onsubmit'=>'return validation();'));
            echo $form->input('id');
            echo "<div class='input'><label>&nbsp</label> &nbsp";
            if($this->data['Adv']['slip']!='')
            {
                echo $html->image('../'.$this->data['Adv']['slip'], array('alt' => 'File hilang','class'=>'slip'));
            }
            echo "</div>";
            
            echo $form->input('slip',array('type'=>'file','label'=>'Slip Pembayaran'));
            echo "<div class='input'><label>".$html->link('[ Back ]',array('controller'=>'advs','action'=>'my_advs'))."</label><input type='submit' value='Submit'></div>";
    echo "</form>";   
    echo "</div>"; 
    echo ":. Format file harus  <span class='red'>Image (.jpg or .jpeg or .gif or .png) </span>";
echo "</div>";        
        
?>